package com.le.tester.book.concurrentchallenge.executorSelf;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ExecutorService;

/**
 * createTime：2025-04-01 13:55
 * description：使用completionServices，使页面元素在下载完成后立即显示出来
 */
public class Renderer {

    private final ExecutorService executorService;

    public Renderer(ExecutorService executorService) {
        this.executorService = executorService;
    }

    void renderPage(CharSequence source) {
        Map<String, Integer> hashMap = new HashMap<>();
        // hashMap.put()
//
//        List<ImageInfo> info = scanForImageInfo(source);
//        CompletionService<ImageData> completionService = new ExecutorCompletionService<>(executorService);
//        completionService.submit()
    }

}
